<%@page import="org.jeecgframework.web.util.StaticValue"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
	<div region="center" style="padding:1px;">
	<span id='message'></span>
		<t:datagrid name="installRecordFifferList" sortName="sn" fitColumns="false" title="安装数据差异历史记录" actionUrl="zyInstallRecordController.do?differHisDatagrid" idField="id" fit="true" queryMode="group">
		   <t:dgCol title="主键"			field="id"		hidden="true"  queryMode="single"  width="120"></t:dgCol>
		   <t:dgCol title="版本号"		field="version"				queryMode="single"	query="false"  width="60"></t:dgCol>
		   <t:dgCol title="上传日期"		field="importDate"	 formatter="yyyy-MM-dd"		queryMode="single"	query="false"  width="80"></t:dgCol>
		   <t:dgCol title="序列号"		field="sn"					queryMode="single"	query="true"  width="85"></t:dgCol>
		   <t:dgCol title="机型"			field="dpModel"		queryMode="single"	query="false"  width="80"></t:dgCol>
		   <t:dgCol title="实际发货日期"	field="actualSendDate" formatter="yyyy-MM-dd"	queryMode="single"	query="false"  width="80"></t:dgCol>
		   <t:dgCol title="所属经销商"	field="belongDealer"				queryMode="single"	query="false"  width="85"></t:dgCol>
		   <t:dgCol title="客户中文名称"	field="cnCustomerName"			queryMode="single"	query="false"  width="80"></t:dgCol>
		   <t:dgCol title="中文地址"		field="cnAddress"				queryMode="single"	query="false"  width="150"></t:dgCol>
		   <t:dgCol title="联系人"		field="contacter"				queryMode="single"	query="false"  width="60"></t:dgCol>
		   <t:dgCol title="电话"			field="telNo"					queryMode="single"	query="false"  width="85"></t:dgCol>
		   <t:dgCol title="安装日期"		field="installedDate"	formatter="yyyy-MM-dd"	queryMode="single"	query="false"  width="80"></t:dgCol>
		   <t:dgCol title="保修期(年)"		field="warrantyPeriod"				queryMode="single"	query="false"  width="40"></t:dgCol>
		   
		   <t:dgCol title="机型"			field="dpModelColor"	hidden="true"	queryMode="single"	query="false"  width="120"></t:dgCol>
		   <t:dgCol title="实际发货日期"	field="actualSendDateColor" hidden="true"	queryMode="single"	query="false"  width="120"></t:dgCol>
		   <t:dgCol title="所属经销商"		field="belongDealerColor" hidden="true" queryMode="single"	query="false"  width="120"></t:dgCol>
		   <t:dgCol title="客户中文名称"	field="cnCustomerNameColor" hidden="true" queryMode="single"	query="false"  width="120"></t:dgCol>
		   <t:dgCol title="中文地址"		field="cnAddressColor" hidden="true" queryMode="single"	query="false"  width="120"></t:dgCol>
		   <t:dgCol title="联系人"		field="contacterColor" hidden="true" queryMode="single"	query="false"  width="120"></t:dgCol>
		   <t:dgCol title="电话"			field="telNoColor" hidden="true" queryMode="single"	query="false"  width="120"></t:dgCol>
		   <t:dgCol title="安装日期"		field="installedDateColor" hidden="true" queryMode="single"	query="false"  width="120"></t:dgCol>
		   <t:dgCol title="保修期"		field="warrantyPeriodColor" hidden="true" queryMode="single"	query="false"  width="120"></t:dgCol>
		   
		   <t:dgCol title="变更类型"		field="type" queryMode="single"	query="false" dictionary="<%=StaticValue.DIC_FILE_SET_TYPE %>" width="60"></t:dgCol>
		   <t:dgCol title="处理状态"		field="status"				queryMode="single"	query="false" dictionary="<%=StaticValue.DIC_FILE_SET_STATUS %>" width="60"></t:dgCol>
		   <%-- <t:dgCol title="操作" field="opt" width="40"></t:dgCol> --%>
  		   <%-- <t:dgDelOpt title="处理" url="zyInstallRecordController.do?doSetStatus&id={id}" /> --%>
		</t:datagrid>
	</div>
</div>
<script>
	function colorStyle(){
		changeTergatColumnColor('dpModelColor','red','installRecordFifferList','dpModel','red');
		changeTergatColumnColor('actualSendDateColor','red','installRecordFifferList','actualSendDate','red');
		changeTergatColumnColor('belongDealerColor','red','installRecordFifferList','belongDealer','red');
		changeTergatColumnColor('cnCustomerNameColor','red','installRecordFifferList','cnCustomerName','red');
		changeTergatColumnColor('cnAddressColor','red','installRecordFifferList','cnAddress','red');
		changeTergatColumnColor('contacterColor','red','installRecordFifferList','contacter','red');
		changeTergatColumnColor('telNoColor','red','installRecordFifferList','telNo','red');
		changeTergatColumnColor('installedDateColor','red','installRecordFifferList','installedDate','red');
		changeTergatColumnColor('warrantyPeriodColor','red','installRecordFifferList','warrantyPeriod','red');
	}
	/**
	*tergatColumn 对比目标列
	*value 对比值
	*datagrId datagrId
	*changeColumn 改变列
	*color 改变颜色 
	*/
	function changeTergatColumnColor(tergatColumn,value,datagrId,changeColumn,color){
		var rows = $("#"+datagrId+"").datagrid('getRows');//获取所有的数据行
			for (var i = 0; i < rows.length; i++) {
				var tergat= rows[i][''+tergatColumn+''];
		        if(tergat==value){
		        	$("td[field='"+changeColumn+"']").parent(".datagrid-row").eq(i).children("td[field='"+changeColumn+"']").css("color",color);
		        }
	     }  
	}
</script>
